/* 符号工具栏样式 */
.symbol-toolbar {
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  padding: 16px;
  height: 100%;
  overflow-y: auto;
  min-width: 200px;
  max-width: 300px;
}

.toolbar-header h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.symbol-category {
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  border: 1px solid #e9ecef;
}

.category-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background-color: #f1f3f5;
  cursor: pointer;
  transition: background-color 0.2s;
  user-select: none;
}

.category-header:hover {
  background-color: #e9ecef;
}

.category-header.expanded {
  background-color: #e3f2fd;
  border-bottom: 1px solid #dee2e6;
}

.category-icon {
  font-size: 16px;
  margin-right: 8px;
  width: 20px;
  text-align: center;
}

.category-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.category-arrow {
  font-size: 12px;
  transition: transform 0.2s;
  color: #6c757d;
}

.category-arrow.expanded {
  transform: rotate(180deg);
}

.category-symbols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 4px;
  padding: 8px;
}

.symbol-button {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.symbol-button:hover {
  background-color: #e3f2fd;
  border-color: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.symbol-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.symbol-label {
  font-size: 16px;
  color: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .symbol-toolbar {
    min-width: 150px;
  }
  
  .category-symbols {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .symbol-button {
    height: 32px;
  }
  
  .symbol-label {
    font-size: 14px;
  }
}

/* 滚动条样式 */
.symbol-toolbar::-webkit-scrollbar {
  width: 6px;
}

.symbol-toolbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.symbol-toolbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.symbol-toolbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 加载动画（可选） */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.symbol-category {
  animation: fadeIn 0.3s ease-out;
}

.symbol-category:nth-child(2) {
  animation-delay: 0.05s;
}

.symbol-category:nth-child(3) {
  animation-delay: 0.1s;
}

.symbol-category:nth-child(4) {
  animation-delay: 0.15s;
}

.symbol-category:nth-child(5) {
  animation-delay: 0.2s;
}

.symbol-category:nth-child(6) {
  animation-delay: 0.25s;
}